package cn.bone.ou.data.controller;

import cn.bone.base.bean.CommonResult;
import cn.bone.ou.data.param.FileParam;
import cn.bone.ou.data.service.IFileService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.validation.Valid;

@RestController
@RequestMapping("/ou/file")
public class FileController {

    @Resource
    private IFileService fileService;

    @RequestMapping("/list")
    public CommonResult list(@Valid FileParam.ListParam param){
        return fileService.list(param);
    }

    @RequestMapping("/add")
    public CommonResult add(@Valid FileParam.AddParam param){
        return fileService.add(param);
    }

    @RequestMapping("/delete")
    public CommonResult delete(@Valid FileParam.DeleteParam param){
        return fileService.delete(param);
    }
}
